<?php	$p=permissionController::singleton(); ?>

<div id="page">

<div id="content">


	<table>
			<th>Data inizio formale</th>
			<th>Data fine formale</th>
			<th>Data inizio effettiva</th>
			<th>Data fine effettiva</th>
			<?php 
			$uri['controller']="AnnoAccademico";
			$uri['method']="Upadate_openViewAnnoAccademico";
			if($p->permission($uri)){ ?>
			<th>Modifica</th>
			<?php }?>
			<?php 
			$uri['controller']="AnnoAccademico";
			$uri['method']="Delete_AnnoAccademico";
			if($p->permission($uri)){ ?>
			<th>Cancella</th>
			<?php }?>

		<?php
		foreach ($vars as $result){
			echo "<tr>
					
					<td >"
						.$result['Data inizio formale']."
					</td>
					<td >"
						.$result['Data fine formale']."
					</td>
					<td >"
						.$result['Data inizio effettiva']."
					</td>
					<td >"
						.$result['Data fine effettiva']."
					</td>";
					
					$uri['controller']="AnnoAccademico";
			        $uri['method']="Upadate_openViewAnnoAccademico";
			if($p->permission($uri)){
						echo"
						<td>
						<a  href='".BASE_PATH."AnnoAccademico/Upadate_openViewAnnoAccademico/?id=".$result[IdAnno]."'>
							<img src='".BASE_PATH."application/view/image/modifica.jpg' border='0'>
						</a>
					</td>";}
					$uri['controller']="AnnoAccademico";
			        $uri['method']="Delete_AnnoAccademico";
			        if($p->permission($uri)){
			       echo"
					<td>
						<a  href='".BASE_PATH."AnnoAccademico/Delete_AnnoAccademico/?id=".$result[IdAnno]."'>
							<img src='".BASE_PATH."application/view/image/esci.png' border='0'>
						</a>
				</tr>";
		}
		}

		?>
		
		
		
		
	</table>
	<br>
	
</div>
</div>

